package com.hzy.base.exception;

public class CustomException extends Exception {
    private static final long serialVersionUID = 1L;
    private Integer code = 400;
    private String message;

    public CustomException() {
    }

    public CustomException(Integer code) {
        this.code = code;
    }

    public CustomException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }

    public CustomException(String message, Throwable cause) {
        super(message, cause);
    }

    public CustomException(String message) {
        super(message);
        this.message = message;
    }

    public CustomException(Throwable cause) {
        super(cause);
    }

    public Integer getCode() {
        return this.code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
